home *** CD-ROM | disk | FTP | other *** search
- /* DVZXM.H
-
- Revision History
-
- 12/07/94 SLY - Original split from PSIWINXM.H into DVZXM.H and DVZXMINT.H
- 10/23/95 Red - Make a little bit more common for cross platform use
- 02/02/96 Red - Fix for windows
-
- */
-
- #ifndef _INC_DVZXM
-
- #define _INC_DVZXM
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #define DVZXM_VERSION 0x0100
-
-
- //*************
- // Types
- //*************
-
- #ifndef _DZTYPES
- typedef short Word; // Signed 16-bit integer
- typedef char * StrPtr; // Pointer to a string
- #endif
-
-
-
- //**************
- // CONSTANTS
- //**************
-
- // TRANSLATION DIRECTIONS
- #define IMPORT_DIR 0
- #define EXPORT_DIR 1
- #define IMPORT_CLIP 2
- #define EXPORT_CLIP 3
-
- // TRANSLATION FORMAT TYPES
- #define ALL_FORMATS 0
- #define WP_FORMATS 1
- #define SS_FORMATS 2
- #define DB_FORMATS 3
- #define GR_FORMATS 4
-
- //**************
- // PROTOTYPES
- //**************
-
- #ifndef DXMHandle
- typedef HANDLE DXMHandle;
- #endif
-
- #ifndef _DXMSTATPROCPTR_
- #define _DXMSTATPROCPTR_
- typedef BOOL (CALLBACK *DXMSTATPROCPTR)(Word);
- #endif
-
-
- //********************************
- // INITIALIZATION FUNCTION GROUP
- //********************************
-
- DXMHandle DXMOpen(LPCSTR lpszPath, HWND hParent);
- /*
- lpszPath is the DOS path which points to the directory that contains our
- translators.
- hParent is the handle of the window to "own" any dialogs that may be
- created by the translation manager.
- */
-
- BOOL DXMClose(DXMHandle hXM);
- /*
- hXM is the DXMHandle returned by DXMOpen(...), a translation context handle
- */
-
- //*****************************************
- // INFORMATION REQUESTING FUNCTION GROUP
- //*****************************************
-
-
- Word DXMGetFilterStringLength (DXMHandle);
- /*
- returns the length of the COMMDLG filter string representing the current
- set of available translation paths.
- */
-
- Word DXMGetFilterString(DXMHandle hXM, LPSTR lpstrFilter, Word cbMax);
- /*
- DXMGetFilterString loads the current COMMDLG filter string (buffer) in
- lpstrFilter up to a maximum of cbMax characters.
- DXMGetFilterString returns the number of characters actually returned in
- lpstrFilter.
- */
-
- Word DXMGetTransPathCount(DXMHandle hXM);
- /*
- hXM is a translation context handle
-
- Returns the number of available translation paths based on the current
- direction, and file format selected.
- */
-
- Word DXMGetTransPathInfo(DXMHandle hXM, Word nPath, StrPtr strAppName, Word cbMax);
- /*
- hXM is a translation context handle
-
- nPath is the one-based index of the translation path
-
- strAppName is a buffer that will receive the application format name string
-
- cbMax is the size of the strAppName buffer
-
- Returns the number of characters actually returned in strAppName, 0 otherwise.
- */
-
- //********************************************
- // TRANSLATION PATH SELECTION FUNCTION GROUP
- //********************************************
-
- BOOL DXMSetTransDirection(DXMHandle hXM, Word nDirection);
- /*
- hXM is a translation context handle
-
- nDirection is the direction of file or clipboard transfer
- IMPORT_DIR, EXPORT_DIR, IMPORT_CLIP, or EXPORT_CLIP
-
- Setting the direction causes the list of available translators
- to be narrowed to reflect the indicated direction.
-
- Returns TRUE if the function was successful
- */
-
- BOOL DXMSetTransFormatType(DXMHandle hXM, Word nFormatType);
- /*
- hXM is a translation context handle
-
- nFormatType is the format type for the translation (ALL_FORMATS, WP_FORMATS, etc...).
-
- Setting the Format Type causes the list of available translators
- and associated applications to be narrowed to reflect the indicated
- Format Type.
-
- Returns TRUE if the function was successful
- */
-
- Word DXMSetTransPathByFile(DXMHandle hXM, LPCSTR theFile);
- /*
- hXM is a translation context handle
-
- theFile is the path and file to be translated
-
- Returns a format index or as follows:
-
- 0 - Format is unknown
- -1 - This file is password protected
- */
-
- BOOL DXMSetTransPath(DXMHandle hXM, Word nPath);
- /*
- hXM is a translation context handle
-
- nPath is a one-based index into the list of selected
- translation paths.
-
- Setting the translation path selects a specific translator for
- import or export.
-
- Returns TRUE if the function was successful
- */
-
- //*****************************************
- // FILE IMPORT/EXPORT FUNCTION GROUP
- //*****************************************
-
- BOOL DXMImport(DXMHandle hXM, LPCSTR sourceFile, LPCSTR resultFile, DXMSTATPROCPTR lpDXMStatProc);
- /*
- hXM is a translation context handle
-
- sourceFile is the source file
-
- resultFile is the result file
-
- lpDXMStatProc points to a routine that will be called back to report translation
- status and check for user cancelling of a translation
-
- Returns TRUE if the function was successful
- */
-
- BOOL DXMExport(DXMHandle hXM, LPCSTR sourceFile, LPCSTR resultFile, DXMSTATPROCPTR lpDXMStatProc);
- /*
- hXM is a translation context handle
-
- sourceFile is the source file
-
- resultFile is the result file
-
- lpDXMStatProc points to a routine that will be called back to report translation
- status and check for user cancelling of a translation
-
- Returns TRUE if the function was successful
- */
-
- //*****************************************
- // ERROR REPORTING FUNCTION GROUP
- //*****************************************
-
- Word DXMGetLastErrorMsg(DXMHandle hXM, StrPtr lpszMessage, Word cbMax);
- /*
- hXM is a translation context handle
-
- lpszMessage is a buffer to receive the error message
-
- cbMax is the size of the lpszMessage buffer
-
- Returns the number of characters actually copies to lpszMessage,
- not including the trailing '\0'
- */
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif // _INC_DVZXM
-